
import defaultSettings from '@/settings'
import request from '@/utils/request'

export const apiUrlConfig = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/common/toplinkFlow/search`,
  exportUrl: `${defaultSettings.ctx.cnapsApp}/common/toplinkFlow/search`,
}


export function getById(id) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/common/toplinkFlow/vueSearch`,
    method: "get",
    params: {
      id
    }
  });
}

export function updateFLow(data) {
    return request({
      url: `${defaultSettings.ctx.cnapsApp}/common/toplinkFlow/vueUpdate`,
      method: "post",
      data
    });
}

export function addFLow(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/common/toplinkFlow/vueSave`,
    method: "post",
    data
  });
}

export function del(id) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/common/toplinkFlow/delete`,
    method: "post",
    params: {
      id
    }
  });
}
